<!doctype html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/static/app/lib/iconfont/iconfont.css">
    <link rel="stylesheet" href="/static/app/css/style.css">
    <script src="/static/app/lib/zy.rem.js"></script>
    <script src="/static/app/lib/jquery1.12.3.min.js"></script>
    <script src="/static/app/js/base.js"></script>
    <style>
        .bottom-center{
            width:100%;
            height: 2rem;
            border-bottom: 1px solid #ccc;
            background-color: #fff;
            position:absolute;
            bottom: 0.96rem;
            z-index:999;
            opacity:0.85;
        }
        .address{
            margin-top: 0.15rem;
            margin-left: 0.2rem;
            font-size: 0.26rem;
        }
        .getime{
              margin-top: 0.3rem;
              margin-left: 0.2rem;
              font-size: 0.262rem;
              color: #666;
          }
        .type{
            margin-top: 0.1rem;
            margin-left: 0.2rem;
            font-size: 0.262rem;
            color: #666;
        }
        .lat{
              margin-top: 0.1rem;
              margin-left: 0.2rem;
              font-size: 0.262rem;
              color: #666;
            display: inline-block;
          }
        .long{
            margin-top: 0.1rem;
            margin-left: 0.5rem;
            font-size: 0.262rem;
            color: #666;
            display: inline-block;
        }
        span{
            margin-left: 0.1rem;
        }
        .fdfd{
            width: 90%;
            margin-left: 5%;
            height: 11.4rem;
            border-bottom: 1px solid #ccc;
            background-color: #fff;
            position: absolute;
            top: 0.9rem;
            z-index: 1000;
            /*opacity: 0.9;*/
            display: none;
        }
        .dffs{
            margin-left: 0.3rem;
            margin-top: 0.3rem;
            font-size: 0.3rem;
            color: #000;
        }
        .namess{
            margin-left: 0.3rem;
            margin-top: 0.3rem;
            font-size: 0.3rem;
            /*border-bottom: 0.001rem solid #ccc;*/
            color: #c2c2c2;
        }
        .as{
            color: red;
        }
    </style>
</head>
<body>
<div class="center" style="padding:0;">
    <div id="allmap"  style='width:100%; height:11.5rem'></div>
</div>
</body>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=2COzFaICuIyVj7V3VetKfmdRVnX8BhVr"></script><!--百度地图api-->
<script type="text/javascript" src="/static/baidumap/js/jquery.bdmap.js"></script><!--百度地图API模块化成函数供前台调用-->
<script type="text/javascript">
    $(function() {
        jinwu();
        setInterval(function working() {
           jinwu();
        }, 60000);
    function jinwu() {

                var map = new BMap.Map('allmap');    // 创建Map实例
                var point =new BMap.Point(121.436043,29.294384);
                var marker = new BMap.Marker(point);  // 创建标注
                map.addOverlay(marker);              // 将标注添加到地图中
                map.centerAndZoom(point, 18);
        var pointA = new BMap.Point(121.436043,29.294384); // 创建点坐标A–宁波市宁海县
        var pointB = new BMap.Point(121.436643,29.294384); // 创建点坐标B–北京市朝阳区
        console.log('从宁波到朝阳区的距离是：'+(map.getDistance(pointA,pointB)).toFixed(2)+'米。'); //获取两点距离,保留小数点后两位。
            }
        });
</script>
</html>